-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploading T1w and T2w pediatric MRI templates generated from philadelphia-pediatric dataset #9
Conversation
…mplates with philadelphia pediatric dataset
…s with philadelphia pediatric dataset
…eraging more times can improve the resolution) and update this file.
…any iterations as T1w template, and will update this file. However, this template looks good as is.
@NadiaBlostein Thank you for this. My suggestion was to upload the templates as release assets, not directly in the git history. The JSON files can stay though. If you don't know how to do this I can take care of it. |
I also noticed a few issues:
pediatric-template_T1w.nii.gzjulien-macbook:~/Desktop $ fslhd pediatric-template_T1w.nii.gz
filename pediatric-template_T1w.nii.gz
sizeof_hdr 348
data_type FLOAT32
dim0 3
dim1 201
dim2 201
dim3 687
dim4 0
dim5 0
dim6 0
dim7 0
vox_units mm
time_units Unknown
datatype 16
nbyper 4
bitpix 32
pixdim0 0.000000
pixdim1 0.500000
pixdim2 0.500000
pixdim3 0.500000
pixdim4 0.000000
pixdim5 0.000000
pixdim6 0.000000
pixdim7 0.000000
vox_offset 352
cal_max 0.000000
cal_min 0.000000
scl_slope 0.000000
scl_inter 0.000000
phase_dim 0
freq_dim 0
slice_dim 0
slice_name Unknown
slice_code 0
slice_start 0
slice_end 0
slice_duration 0.000000
toffset 0.000000
intent Unknown
intent_code 0
intent_name
intent_p1 0.000000
intent_p2 0.000000
intent_p3 0.000000
qform_name Unknown
qform_code 0
qto_xyz:1 0.500000 0.000000 0.000000 0.000000
qto_xyz:2 0.000000 0.500000 0.000000 0.000000
qto_xyz:3 0.000000 0.000000 0.500000 0.000000
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Left-to-Right
qform_yorient Posterior-to-Anterior
qform_zorient Inferior-to-Superior
sform_name Unknown
sform_code 1
sto_xyz:1 -0.500000 0.000000 0.000000 50.250000
sto_xyz:2 -0.000000 0.500000 0.000000 -50.250000
sto_xyz:3 -0.000000 0.000000 0.500000 -336.818176
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Right-to-Left
sform_yorient Posterior-to-Anterior
sform_zorient Inferior-to-Superior
file_type NIFTI-1+
file_code 1
descrip mnc2nii avg.007.mnc
aux_file pediatric-template_T2w.nii.gzjulien-macbook:~/Desktop $ fslhd pediatric-template_T2w.nii.gz
filename pediatric-template_T2w.nii.gz
sizeof_hdr 348
data_type FLOAT32
dim0 3
dim1 201
dim2 201
dim3 680
dim4 0
dim5 0
dim6 0
dim7 0
vox_units mm
time_units Unknown
datatype 16
nbyper 4
bitpix 32
pixdim0 0.000000
pixdim1 0.500000
pixdim2 0.500000
pixdim3 0.500000
pixdim4 0.000000
pixdim5 0.000000
pixdim6 0.000000
pixdim7 0.000000
vox_offset 352
cal_max 0.000000
cal_min 0.000000
scl_slope 0.000000
scl_inter 0.000000
phase_dim 0
freq_dim 0
slice_dim 0
slice_name Unknown
slice_code 0
slice_start 0
slice_end 0
slice_duration 0.000000
toffset 0.000000
intent Unknown
intent_code 0
intent_name
intent_p1 0.000000
intent_p2 0.000000
intent_p3 0.000000
qform_name Unknown
qform_code 0
qto_xyz:1 0.500000 0.000000 0.000000 0.000000
qto_xyz:2 0.000000 0.500000 0.000000 0.000000
qto_xyz:3 0.000000 0.000000 0.500000 0.000000
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Left-to-Right
qform_yorient Posterior-to-Anterior
qform_zorient Inferior-to-Superior
sform_name Unknown
sform_code 1
sto_xyz:1 -0.500000 0.000000 0.000000 50.250000
sto_xyz:2 -0.000000 0.500000 0.000000 -50.250000
sto_xyz:3 -0.000000 0.000000 0.500000 -333.203949
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Right-to-Left
sform_yorient Posterior-to-Anterior
sform_zorient Inferior-to-Superior
file_type NIFTI-1+
file_code 1
descrip mnc2nii avg.007.mnc
aux_file |
Hi @jcohenadad, I did not know that the two templates had to be built in the same space. Below is an overview of what I understood, to make sure we are on the same page: Summary of the template-generation process (what I undersood)1. An initial template space is generated based on the average length of the intervertebral levels of the subjects in the dataset of interest. It gets saved downstream as a file called 2. The straightening and normalization method straightens all of the spinal cord images of the subjects and brings them into the same space as 3. An iterative vowel-wise inter-subject averaging begins. Making sure we are on the same page: details & questions1. An initial template space is generated based on the average length of the intervertebral levels of the subjects in the dataset of interest. It gets saved downstream as a file called
2. The straightening and normalization method straightens all of the spinal cord images of the subjects and brings them into the same space as
3. The iterative vowel-wise inter-subject averaging begins.
Moving forward
|
Uploaded as release asset.
Uploaded as release asset.
Minor README typo
@jcohenadad I just re-uploaded the files as release assets. |
Thank you for the thorough explanation @NadiaBlostein
Yes it does make sense. So I'm wondering how @benjamindeleener managed to get the same voxel and world space coordinates. @benjamindeleener can you please comment?
Excellent-- thank you |
I don't think they should necessarily have different sizes as both template represent and are generated from the same subjects. The way I ensured both T1w and T2w have the same size was to use only one initial template. For example, you generate the initial template using T1w along with all the labels (centerline and disks locations) and you straighten the T1w and the T2w images to this initial template. You should therefore have all the images into the same space. |
Updated version of pediatric dataset to obtain from git annex
Thank you @benjamindeleener-- based on #9 (comment), I would suggest to slightly revise the method for creating the templates. In order to work iteratively though, I suggest to open an issue based on Benjamin's comments, merge this PR, and in a subsequent PR address Ben's comment |
Updated dataset version (now just master branch; updated commit ID), see [data-management closed issue 248](neuropoly/data-management#248 (comment))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good! I updated the dataset version in the README.
Hi @jcohenadad, I just re-uploaded the templates – everything should be correct now, see latest release. Explanation below. Summary of template-generation (repeated from comment above)
Current templates + previous error explained
Moving forwardIs this clear and correct? Thank you |
Thank you @NadiaBlostein, your explanation is clear, but I think it does not address the solution that @benjamindeleener mentioned, ie: using the same target space for both contrasts (you still generate each template in its own image space). But since the release is done, we can merge this PR and address this issue in a subsequent PR. I've opened an issue: #10 I've also added more context in the release text (under 'details'): https://github.com/spinalcordtoolbox/pediatric-template/releases/tag/r20231010 |
Fixes #6, Fixes #7